var baseConfig = require("../../baseConfig");
Page({
  data: {
    list: [],
  },
  onLoad: function (options) {
    this.getList()
  },
  getList() {
    wx.request({
      url: `${baseConfig.baseUrl}get_system_notice_list`,
      method: 'GET',
      header: {
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      success: res => {
        console.log(res.data.data);
        this.setData({
          list: res.data.data
        })
      }
    })
  },
  toDetail(e) {
    console.log(e.currentTarget.dataset.id);
    let id = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: '/pages/systemDetail/systemDetail?id=' + id,
    })
  },
})